package top.cjwtx.holy.phone.config;

import org.apache.shiro.authc.UsernamePasswordToken;

/**
 * 自实现认证类
 */
public class MyAuthenticationToken extends UsernamePasswordToken {

    private int loginTypeId;
    private String token;

    //token类型登陆
    public MyAuthenticationToken(String username, String password,String token,int loginTypeId) {
       this.setUsername(username);
       this.setPassword(password.toCharArray());
       this.loginTypeId=loginTypeId;
       this.token = token;
    }

    //账号密码登陆
    public MyAuthenticationToken(String username, String password,int loginType) {
        this.setUsername(username);
        this.setPassword(password.toCharArray());
        this.loginTypeId=loginType;
    }

    public int getLoginTypeId() {
        return loginTypeId;
    }

    public void setLoginType(int loginTypeId) {
        this.loginTypeId = loginTypeId;
    }

    public String getToken() {
        return token;
    }

    public void setToken(String token) {
        this.token = token;
    }


}
